// 2013-8-10下午08:34:53  net.betou.pojo.Report.java

package net.betou.pojo;

import java.io.Serializable;


/**
 * 报表封装 
 * @author 叶装装
 */
public class Report implements Serializable{
	
	private Long count; // 数据 
	private Integer time; // 年 或者月 或者 日
	
	public Report( ){}
	
	public Report( Long count, Integer time ){
		this.count = count;
		this.time = time;
	}
	
	public Long getCount( ) {
		return count;
	}

	public void setCount( Long count ) {
		this.count = count;
	}

	public Integer getTime( ) {
		return time;
	}

	public void setTime( Integer time ) {
		this.time = time;
	}
	
	private int hashCode = Integer.MIN_VALUE;
	
	public boolean equals( Object obj ) {
		if( null == obj )
			return false;
		if( !( obj instanceof Report ) )
			return false;
		else{
			Report report = ( Report ) obj;
			if( null == this.getTime( ) || null == report.getTime( ) )
				return false;
			else
				return( this.getTime( ).equals( report.getTime( ) ) );
		}
	}

	public int hashCode( ) {
		if( Integer.MIN_VALUE == this.hashCode ){
			if( null == this.getTime( ) )
				return super.hashCode( );
			else{
				String hashStr = this.getClass( ).getName( ) + ":" + this.getTime( ).hashCode( );
				this.hashCode = hashStr.hashCode( );
			}
		}
		return this.hashCode;
	}


	private static final long serialVersionUID = -4403166368644454594L;

}
